////////////////////////////////////////////////////////////////////
// File:	Animation.h
// Purpose: Holds the duration of an animation and all of it's keyframes
//			used by the interpolator class and the AnimationManager
// Author:	Jay Baird
////////////////////////////////////////////////////////////////////

#ifndef ANIMATION_H
#define ANIMATION_H

#include "AnimationComponents.h"	

class Interpolator;
class AnimationManager;

typedef std::vector<AnimationComponent::KeyFrame>::iterator KeyFrameIter;
typedef std::vector<AnimationComponent::KeyFrame>::const_iterator KeyFrameIterConst;

class Animation
{
	friend Interpolator;
	friend AnimationManager;

private:
	float m_duration;	// The total time of this animation
	std::vector<AnimationComponent::KeyFrame> m_keyFrames;

public:
	Animation() : m_duration(0.0f) { }
	~Animation() { }

	float GetDuration() const { return m_duration; }
	void SetDuration(float duration) { m_duration = duration; }
};

#endif